Programming in Logic